﻿using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace com.chen.Identity
{
    public class IdentityDbContextExtend: IdentityDbContext<IdentityUserExtends>
    {
        public IdentityDbContextExtend(DbContextOptions<IdentityDbContextExtend> options):base(options)
        {

        }
        protected override void OnModelCreating(ModelBuilder builder)
        {
            builder.Entity<IdentityUserExtends>(opt =>
            {
                opt.Property(p => p.Disabled).HasDefaultValueSql("0");
            });

            base.OnModelCreating(builder);
        }
    }
}
